package view;

import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;

public class GameGillListener implements ActionListener {

	private Container contain;
	
	private String firstSyllable;
	private String secondSyllable;
	
	private boolean itsSecond;
	private boolean itsFisrt; 
	
	private JButton button1;
	private JButton button2;
	
	public GameGillListener(Container contain) {
		this.contain=contain;
		this.button1=new JButton("");
		this.button2=new JButton("");
	}
	@Override
	public void actionPerformed(ActionEvent ev) {
		String s1;
		String s2;
	    if(!itsFisrt) {
			button1=(JButton)ev.getSource();
			s1=ev.getActionCommand();
			itsFisrt=true;
		}
		else {
			button2=(JButton)ev.getSource();
			s2=ev.getActionCommand();
			setItsSecond(true);
		}
		
		// TODO Auto-generated method stub
		
	}
	/**
	 * @return the itsSecond
	 */
	public boolean isItsSecond() {
		return itsSecond;
	}
	/**
	 * @param itsSecond the itsSecond to set
	 */
	public void setItsSecond(boolean itsSecond) {
		this.itsSecond = itsSecond;
	}

}
